<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSystemTechValueTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('system_tech_value', function (Blueprint $table) {
            $table->increments('id');
            $table->string('type',64)->comment('类型');
            $table->string('value',512)->comment('值');
            $table->string('description',512)->comment('描述')->nullable();
            $table->tinyInteger('is_active')->default(1)->comment('是否有效0:否 1:是');
            $table->string('created_user',64)->default('')->comment('创建人');
            $table->string('updated_user',64)->default('')->comment('修改人');
            $table->timestamps();

            $table->unique('type','uniq_type');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('system_tech_value');
    }
}
